package com.by.orders.controller;

import com.by.common.core.bean.ResultBean;
import com.by.common.core.response.R;
import com.by.orders.service.OrderService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(name = "移动端订单")
@RequestMapping("/api/mobile/v1")
public class OrderMobileController {

    @Autowired
    OrderService orderService;

    @PostMapping("/saveMobileOrder")
    @Operation(summary = "保存移动订单")
    public ResultBean saveMobileOrder(){
        int userId=23;
        String no=orderService.saveMobileOrder(userId);
        return R.success("生成订单以及订单号",no);
    }
}
